package com.elock.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.elock.base.core.entity.BaseEntity;

/**
 * Entity - 车辆机构关联
 * @author 仁德
 */
@Entity
@Table(name = "car_sale_org")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "car_sale_org_sequence")
public class CarSaleOrg extends BaseEntity {

	private static final long serialVersionUID = 1386745660360951034L;

	/** 车辆 */
	private Car car;

	/** 机构 */
	private SaleOrg saleOrg;

	/**  
	 * 获取car  
	 * @return car car  
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	public Car getCar() {
		return car;
	}

	/**  
	 * 设置car  
	 * @param car car  
	 */
	public void setCar(Car car) {
		this.car = car;
	}

	/**  
	 * 获取saleOrg  
	 * @return saleOrg saleOrg  
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	public SaleOrg getSaleOrg() {
		return saleOrg;
	}

	/**  
	 * 设置saleOrg  
	 * @param saleOrg saleOrg  
	 */
	public void setSaleOrg(SaleOrg saleOrg) {
		this.saleOrg = saleOrg;
	}

}
